package com.css.fxfzfxqh.modules.lifelineEngineering.constants;

import cn.hutool.core.util.StrUtil;
import com.css.fxfzfxqh.util.PlatformObjectUtils;
import com.css.fxfzfxqh.util.UUIDGenerator;

import java.util.HashMap;
import java.util.Map;

public class FunctionalFailureConstants {
    public static final Map<String, String> FUNCTIONAL_FAILURE_MAP = new HashMap<>();
    static {
        FUNCTIONAL_FAILURE_MAP.put("基本完好","有效");
        FUNCTIONAL_FAILURE_MAP.put("轻微破坏","有效");
        FUNCTIONAL_FAILURE_MAP.put("中等破坏","有效");
        FUNCTIONAL_FAILURE_MAP.put("倒塌","失效");
        FUNCTIONAL_FAILURE_MAP.put("毁坏","失效");
        FUNCTIONAL_FAILURE_MAP.put("严重破坏","失效");
    }

    public static String getConstant(String destructiveState) {
        if(StrUtil.isBlankIfStr(destructiveState)){
            return null;
        }
        return FUNCTIONAL_FAILURE_MAP.get(destructiveState);
    }
}
